/**
 * Created by oiuyt on 2018/7/18.
 */
import React from 'react';
import {
    //BrowserRouter as Router,
    Route,
    //Link,
    Switch,
    //Prompt,

} from 'react-router-dom'


//异步导入工具组件
import asyncComponent from '../utils/asyncComponent'

//异步载入组件
//const Empty = asyncComponent(() => import("../components/common/empty"))
const Home = asyncComponent(() => import("../components/main/main"))
const Test1 = asyncComponent(() => import("../components/main/test1"))
const Test2 = asyncComponent(() => import("../components/main/test2"))
//const Test3 = asyncComponent(() => import("../components/main/test3"))
const Test4 = asyncComponent(() => import("../components/main/test4"))

const NoMatch = asyncComponent(() => import("../components/common/noMatch"))

const RouterList = () => (
        <Switch>
            <Route path="/home" exact component={Home} />
            <Route path="/test1/:title" component={Test1} />
            <Route path="/test2" component={Test2} />
            <Route path="/test4"  component={Test4} />
            <Route component={NoMatch}/>
        </Switch>
)

export default RouterList
